package com.fjnldx.mes.domain.pojo.alarm;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("alarm_config")
public class AlarmConfig {
    //主键
    @TableId(type = IdType.AUTO)
    Integer id;
    
    //编号
    String code;
    
    //告警名称
    @TableField("name")
    String name;

    //告警状态
    @TableField("isActive")
    Boolean isActive;

    //告警备注
    @TableField("note")
    String note;

    //已删除
    @JsonIgnore
    @TableLogic
    @TableField("isDeleted")
    Boolean isDeleted;

    //创建时间
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("createTime")
    LocalDateTime createTime;

    //删除时间
    @JsonIgnore
    @TableField("deleteTime")
    LocalDateTime deleteTime;
}
